﻿[assembly:
        System.Web.UI.WebResource("BM.Tools.WebControls.MForm.BlogExample.HtmlEditorValueHandler.js",
                "application/x-javascript")]

namespace BM.Tools.WebControls.MForm.BlogExample
{        
    using AjaxControlToolkit;
    using AjaxControlToolkit.HTMLEditor;
    using BM.Tools.WebControls.MForm.Controls.ValueHandlers;

    /// <summary>
    /// This is a value handler for the <see cref="Editor"/> control.
    /// </summary>
    [ClientScriptResource("BM.Tools.WebControls.MForm.BlogExample",
            "BM.Tools.WebControls.MForm.BlogExample.HtmlEditorValueHandler.js")]
    public class HtmlEditorValueHandler : StandardWebControlValueHandler<Editor>
    {
        /// <summary>
        /// Gets or sets Value.
        /// </summary>
        public override string Value
        {
            get
            {
                return Control.Content;                
            }

            set
            {
                Control.Content = value;
            }
        }
    }
}
